package com.framework.modules.guild.service.impl;

import com.framework.modules.base.entity.UserEntity;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.common.utils.PageUtils;
import com.framework.common.utils.Query;

import com.framework.modules.guild.dao.GuildDao;
import com.framework.modules.guild.entity.GuildEntity;
import com.framework.modules.guild.service.GuildService;


@Service("guildService")
public class GuildServiceImpl extends ServiceImpl<GuildDao, GuildEntity> implements GuildService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<GuildEntity> page = this.selectPage(
                new Query<GuildEntity>(params).getPage(),
                new EntityWrapper<GuildEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public Map<String,Object> checkMcnLogin(String username){
        return baseMapper.checkMcnLogin(username);
    }

    @Override
    public List<Map<String,Object>> getNewerGuildMembers(Integer guildId){
        return baseMapper.getNewerGuildMembers(guildId);
    }

    @Override
    public List<Map<String,Object>> getGuildStatList(Integer guildId){
        return baseMapper.getGuildStatList(guildId);
    }

    @Override
    public Map<String,Object> GetGuildMemberFullInfo(Integer uid, Integer guildId) {
        return baseMapper.GetGuildMemberFullInfo(uid, guildId);
    }
}
